<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>vue基础模板</title>
    <script src='../vue.js'></script>
    <style>
        .publish {
            width: 100px;
            height: 100px
        }

        .red {
            background-color: red;
        }

        .pink {
            background-color: pink;
        }

        .skyblue {
            background-color: skyblue;
        }

        .rotateZ {
            transform: rotateZ(30deg);
        }

        .bold {
            font-weight: bold;
        }

        .initial {
            font-style: italic;
        }
    </style>
</head>

<body>
    <div id='app'>
        <div class="publish" :class="classRed"></div>
        <div class="publish" :class="classObj"></div>
        <div class="publish" :class="classArr">九歌</div>
        <div class="publish"></div>
    </div>

    <script>
        Vue.config.productionTip = false;
        const vm = new Vue({
            el: '#app',
            data() {
                return {
                    classRed: 'red',
                    classObj: {
                        skyblue: true,
                        rotateZ: true
                    },
                    classArr: [
                        { pink: true },
                        { initial: true },
                        { bold: true },
                    ]
                }
            }
        })
    </script>
</body>

</html>